import request from "@/utils/request";

const url = "/pre/imageManage";
export const getListApi = (params) => {
  return request({
    url: `${url}/list`,
    method: "GET",
    params,
  });
};

export const getListDetailsApi = (id) => {
  return request({
    url: `/pre/imageManage/${id}`,
    method: "GET",
  });
};

export const addListApi = (data) => {
  return request({
    url: `${url}`,
    method: "POST",
    data,
  });
};

export const deleteListApi = (ids) => {
  return request({
    url: `${url}/${ids}`,
    method: "DELETE",
  });
};

// 修改感知样本接口
export const updateListApi = (data) => {
  return request({
    url: `${url}`,
    method: "PUT",
    data,
  });
};

export const downloadListApi = (params) => {
  return request({
    url: `${url}/download`,
    method: "GET",
    params,
    responseType: "blob",
    timeout: 60000,
  });
};
